package com.huqu.entities;

import java.io.Serializable;
import java.sql.Timestamp;
import java.sql.Types;

import com.huqu.basedao.QbMapping;
import com.huqu.utils.ApplicationConstant;
import com.huqu.utils.ApplicationHelper;

/**
 * @author CONGQUYNH
 */
public class N500 implements Serializable {

	private static final long serialVersionUID = -3497787045170802752L;
	@QbMapping(name = "idvideo", typeMapping = Types.INTEGER)
	private int idvideo;
	private String md5video;
	
	@QbMapping(name = "tenvideo", typeMapping = Types.CHAR)
	private String tenvideo;
	
	@QbMapping(name = "tomtat", typeMapping = Types.CHAR)
	private String tomtat;
	
	@QbMapping(name = "tenmuc", typeMapping = Types.CHAR)
	private String tenmuc;
	
	@QbMapping(name = "idmuc", typeMapping = Types.INTEGER)
	private int idmuc;
	
	@QbMapping(name = "link", typeMapping = Types.CHAR)
	private String link;
	
	@QbMapping(name = "keylink", typeMapping = Types.CHAR)
	private String keylink;
	
	@QbMapping(name = "nguon", typeMapping = Types.CHAR)
	private String nguon;
	
	@QbMapping(name = "hinhanh", typeMapping = Types.CHAR)
	private String hinhanh;
	
	@QbMapping(name = "nguoitao", typeMapping = Types.INTEGER)
	private int nguoitao;
	
	@QbMapping(name = "ngaytao", typeMapping = Types.TIMESTAMP )
	private Timestamp ngaytao;
	
	@QbMapping(name = "nguoicapnhat", typeMapping = Types.INTEGER)
	private int nguoicapnhat;
	
	@QbMapping(name = "ngaycapnhat", typeMapping = Types.TIMESTAMP )
	private Timestamp ngaycapnhat;
	
	@QbMapping(name = "daxoa", typeMapping = Types.INTEGER)
	private int daxoa;
	
	@QbMapping(name = "kiemduyet", typeMapping = Types.INTEGER)
	private int kiemduyet;

	@QbMapping(name = "luotxem", typeMapping = Types.INTEGER)
	private int luotxem;

//==============================================================================================================
//==============================================================================================================
//==============================================================================================================
	public int getIdvideo() {
		return idvideo;
	}

	public void setIdvideo(int idvideo) {
		this.idvideo = idvideo;
	}

	public String getMd5video() {
		if(idvideo!=0){
			md5video=ApplicationHelper.convertToMD5(String.valueOf(idvideo));
		}
		return md5video;
	}

	public void setMd5video(String md5video) {
		this.md5video = md5video;
	}

	public String getTenvideo() {
		return tenvideo;
	}

	public void setTenvideo(String tenvideo) {
		this.tenvideo = tenvideo;
	}

	public String getLink() {
		return link;
	}

	public void setLink(String link) {
		this.link = link;
	}

	public String getHinhanh() {
		if(hinhanh==null){
			hinhanh=ApplicationConstant.URL_NO_IMAGE;
		}else{
			hinhanh=ApplicationConstant.URL_IMAGE_VIDEO+hinhanh;
		}
		return hinhanh;
	}

	public void setHinhanh(String hinhanh) {
		this.hinhanh = hinhanh;
	}

	public int getNguoitao() {
		return nguoitao;
	}

	public void setNguoitao(int nguoitao) {
		this.nguoitao = nguoitao;
	}

	public int getDaxoa() {
		return daxoa;
	}

	public void setDaxoa(int daxoa) {
		this.daxoa = daxoa;
	}

	public int getKiemduyet() {
		return kiemduyet;
	}

	public void setKiemduyet(int kiemduyet) {
		this.kiemduyet = kiemduyet;
	}

	public int getLuotxem() {
		return luotxem;
	}

	public void setLuotxem(int luotxem) {
		this.luotxem = luotxem;
	}

	public String getTenmuc() {
		return tenmuc;
	}

	public void setTenmuc(String tenmuc) {
		this.tenmuc = tenmuc;
	}

	public int getIdmuc() {
		return idmuc;
	}

	public void setIdmuc(int idmuc) {
		this.idmuc = idmuc;
	}

	public String getKeylink() {
		return keylink;
	}

	public void setKeylink(String keylink) {
		this.keylink = keylink;
	}

	public String getNguon() {
		return nguon;
	}

	public void setNguon(String nguon) {
		this.nguon = nguon;
	}

	public Timestamp getNgaytao() {
		return ngaytao;
	}

	public void setNgaytao(Timestamp ngaytao) {
		this.ngaytao = ngaytao;
	}

	public int getNguoicapnhat() {
		return nguoicapnhat;
	}

	public void setNguoicapnhat(int nguoicapnhat) {
		this.nguoicapnhat = nguoicapnhat;
	}

	public Timestamp getNgaycapnhat() {
		return ngaycapnhat;
	}

	public void setNgaycapnhat(Timestamp ngaycapnhat) {
		this.ngaycapnhat = ngaycapnhat;
	}

	public String getTomtat() {
		return tomtat;
	}

	public void setTomtat(String tomtat) {
		this.tomtat = tomtat;
	}
	
	
}
